#include "message.h"

Message::Message(QString to, QString from)
    : m_state(None),m_type(Normal),m_from(from),m_to(to)
{
}

Message::Message(QString to, QString from, QString body)
    : m_state(None),m_type(Normal),m_from(from),m_to(to),m_body(body)
{
}

Message::Message(QString to, QString from, Message::State state)
    : m_state(state),m_type(Normal),m_from(from), m_to(to)
{
}

Message::State Message::state()
{
    return m_state;
}

Message::Type Message::type()
{
    return m_type;
}

QString Message::from()
{
    return m_from;
}

QString Message::to()
{
    return m_to;
}

QString Message::body()
{
    return m_body;
}

QString Message::thread()
{
    return m_thread;
}

QDateTime Message::stamp()
{
    return m_stamp;
}

QString Message::subject()
{
    return m_subject;
}

void Message::setState(Message::State state)
{
    m_state = state;
}

void Message::setType(Message::Type type)
{
    m_type = type;
}

void Message::setFrom(QString from)
{
    m_from = from;
}

void Message::setTo(QString to)
{
    m_to = to;
}

void Message::setBody(QString body)
{
    m_body = body;
}

void Message::setStamp(QDateTime stamp)
{
    m_stamp = stamp;
}

void Message::setSubject(QString subject)
{
    m_subject = subject;
}
